package scuts;




// only usings




typedef ExportFlatten1 = scuts.core.Flatten.FlattenArray;
typedef ExportFlatten2 = scuts.core.Flatten.FlattenLazyIterator;


typedef ExportFold2 = scuts.core.Fold.FoldIterable;
typedef ExportFold3 = scuts.core.Fold.FoldIterator;
typedef ExportReduce1 = scuts.core.Reduce.ReduceArr;




typedef ExportFilter1 = scuts.core.Filter.FilterArray;
typedef ExportFilter2 = scuts.core.Filter.FilterIterator;
typedef ExportFilter3 = scuts.core.Filter.FilterIterable;




// Export, order matters!

typedef ExportFindIndex1 = scuts.core.FindIndex.FindIndexIterable;
typedef ExportFindIndex2 = scuts.core.FindIndex.FindIndexIterator;

typedef ExportLast1 = scuts.core.Last.LastArray;
typedef ExportLast2 = scuts.core.Last.LastIterable;
typedef ExportLast3 = scuts.core.Last.LastIterator;

typedef ExportAny1 = scuts.core.Any.AnyIterable;
typedef ExportAny2 = scuts.core.Any.AnyIterator;



typedef ExportTake1 = scuts.core.Take.TakeIterable;
typedef ExportTake2 = scuts.core.Take.TakeIterator;

typedef ExportMap1 = scuts.core.Map.MapArrayOption;
typedef ExportMap2 = scuts.core.Map.MapArray;
typedef ExportMap3 = scuts.core.Map.MapList;
typedef ExportMap4 = scuts.core.Map.MapIterable;
typedef ExportMap5 = scuts.core.Map.MapIterator;


typedef ExportOptions = scuts.core.extensions.Options;
typedef ExportEithers = scuts.core.extensions.Eithers;
typedef ExportFloats = scuts.core.extensions.Floats;
typedef ExportInts = scuts.core.extensions.Ints;
typedef ExportObjects = scuts.core.extensions.Objects;
typedef ExportIterables = scuts.core.extensions.Iterables;
typedef ExportLazyIterators = scuts.core.extensions.LazyIterators;
typedef ExportDynamics = scuts.core.extensions.Dynamics;
typedef ExportArrays = scuts.core.extensions.Arrays;


typedef ExportFlatMap1 = scuts.core.FlatMap.FlatMapArrayOption;
typedef ExportFlatMap2 = scuts.core.FlatMap.FlatMapArray;
typedef ExportFlatMap3 = scuts.core.FlatMap.FlatMapOption;





typedef ExportZip1 = scuts.core.Zip.ZipArray;

typedef ExportAnd1 = scuts.core.And.AndPredicate0;
typedef ExportAnd2 = scuts.core.And.AndPredicate1;
typedef ExportAnd3 = scuts.core.And.AndPredicate2;

typedef ExportOr1 = scuts.core.Or.OrPredicate0;
typedef ExportOr2 = scuts.core.Or.OrPredicate1;
typedef ExportOr3 = scuts.core.Or.OrPredicate2;

typedef ExportNot1 = scuts.core.Not.NotPredicate0;
typedef ExportNot2 = scuts.core.Not.NotPredicate1;
typedef ExportNot3 = scuts.core.Not.NotPredicate2;

typedef ExportCompose1 = scuts.core.Compose.Compose1_1;
typedef ExportCompose2 = scuts.core.Compose.Compose1_2;



typedef ExportFlip1 = scuts.core.Flip.Flip2;
typedef ExportFlip2 = scuts.core.Flip.Flip3;
typedef ExportFlip3 = scuts.core.Flip.Flip4;



typedef ExportCurry2 = scuts.core.Curry.Curry2;
typedef ExportCurry3 = scuts.core.Curry.Curry3;
typedef ExportCurry4 = scuts.core.Curry.Curry4;

typedef ExportSum1 = scuts.core.Sum.SumIterableFloat;
typedef ExportSum2 = scuts.core.Sum.SumIterableInt;
typedef ExportSum3 = scuts.core.Sum.SumIteratorInt;
typedef ExportSum4 = scuts.core.Sum.SumIterableFloat;
typedef ExportSum5 = scuts.core.Sum.SumIterable;
typedef ExportSum6 = scuts.core.Sum.SumIterator;

typedef GetOrElseOption = scuts.core.GetOrElse.GetOrElseOption;
typedef GetOrElseDynamic = scuts.core.GetOrElse.GetOrElseDynamic;

typedef ExportPartApply1 = scuts.core.PartApply.PartApply1;
typedef ExportPartApply2 = scuts.core.PartApply.PartApply2;
typedef ExportPartApply3 = scuts.core.PartApply.PartApply3;
typedef ExportPartApply4 = scuts.core.PartApply.PartApply4;
typedef ExportPartApply5 = scuts.core.PartApply.PartApply5;
typedef ExportPartApply6 = scuts.core.PartApply.PartApply6;



// Fallback as Last Option

/*

class ToStringGeneric {
  public static inline function toString <T>(v:T):String {
    return Std.string(v);
  }
}



class GenericTools {
  public static inline function orDefault < T > (v:T, def:T):T {
    return v == null ? def : v;
  }
  
  
}

*/
// functions















/*
class SelectIterator {
  public static function selectF <T>(it:Iterator<T>, select: T->T->T):T {
    var selected = null;
    var first = true;
    for (e in it) {
      if (first) {
        selected = e;
        first = false;
      } else {
        selected = select(e, selected);
      }
    }
    return selected;
  }
}

class SelectIterable {
  public static inline function selectF <T>(it:Iterable<T>, select: T->T->T):T {
    return SelectIterator.selectF(it.iterator(), select);
  }
}
*/
/*
class ConvertIteratorToObject {
	public static function convertToObject<A,C>(a:Iterator<A>, f:A->String, v:A->C): Dynamic
	{
		var o:Dynamic = { };
		return FoldIterator.foldl(a, 
			function (acc:Dynamic, e:A) { Reflect.setField(acc, f(e), v(e)); return acc; }, 
			o );
	}
}

class ConvertIterableToObject {
	public static function convertToObject<A,C>(a:Iterable<A>, f:A->String, v:A->C): Dynamic
	{
		return ConvertIteratorToObject.convertToObject(a.iterator(), f, v);
	}
}
*/



